<?php
class Core_Data_Mysqlescape implements Core_Data_Mainable {
	
	/**
	 * mysql real escape string
	 * @see Core_Data_Mainable::main()
	 */
	public function main(array $variables = null){
            //var_dump($variables);
            //die();
		foreach ($variables as $key => $value){
			if(is_array($value)){
				$variables[$key] = $this->main($value);
			}
			else {
				$variables[$key] = @mysql_real_escape_string($value);
			}
		}
		return $variables;
	}
}